package com.qk.management.mapper;

import com.qk.dto.activity.ActivityDTO;
import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:Shuna
 * @Date: 2025/10/09 11:27
 * @Description:
 */
@Mapper
public interface ActivityMapper {

    List<Activity> selectByPage(ActivityDTO activityDTO);

    void add(Activity activity);

    @Delete("delete from activity where id = #{id}")
    void deleteById(Integer id);

    @Select("select * from activity where id = #{id}")
    Activity selectById(Integer id);

    void update(Activity activity);

    @Select("select * from activity where type = #{type}")
    List<Activity> selectByType(Integer type);
}
